﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/App_Widget/Navbar.ascx" TagName="navbar" TagPrefix="UITag" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 100%;
            height: 117px;
        }

        .auto-style2 {
            width: 56px;
        }

        .auto-style3 {
            height: 20px;
        }

        .auto-style4 {
            height: 36px;
        }
    </style>
    <link href="App_Themes/simple.css" rel="stylesheet" />


</head>
<body>
    <UITag:navbar runat="server" ID="navbar" />
    <form id="form1" runat="server">
        <div class="container">
            <div id="carousel">

                <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                    <!-- Indicators -->
                    <ol class="carousel-indicators">
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                    </ol>

                    <!-- Wrapper for slides -->
                    <div class="carousel-inner" role="listbox">
                       
                        <%
                            List<Model.House> list = BLL.HouseManage.GetRecommendedHouses(3);
                            for (int cnt = 0; cnt < list.Count(); cnt++)
                            {
                                if (cnt == 0)
                                    Response.Write("<div class='item active'>");
                                else
                                    Response.Write("<div class='item'>");
                                Response.Write("<a href='HouseDetail.aspx?HouseId=" + list[cnt].Id + "'>");
                                Response.Write("<img class='img-carousel' style='height:400px' src='" + (list[cnt].ThumbnailUri.Substring(1)) + "'/>");
                                Response.Write("</a>");
                                Response.Write("<div class='carousel-caption'>");
                                Response.Write(list[cnt].AdminReview);
                                Response.Write("</div></div>");
                            }
                             %>
                       
                    </div>

                    <!-- Controls -->
                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left"></span>
                        <span class="sr-only">Previous</span>
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right"></span>
                        <span class="sr-only">Next</span>
                    </a>
                </div>
            </div>

            <br /><br />
            <!-- Search Area -->
            <div id="search" class="block-info">
                <div class="lead">
                    房屋信息检索
                </div>
                <div>
                    <div>
                        <asp:Label ID="lbl_Address" runat="server" Text="区域"></asp:Label>
                        <asp:LinkButton ID="lbl_Address_Unlimit" runat="server" Text="不限" OnClick="OnClick_Address_Unlimit"> </asp:LinkButton>
                    </div>
                    <div>
                        <asp:DataList runat="server" ID="dl_Area" RepeatDirection="Horizontal" OnItemCommand="dl_Area_ItemCommand">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton19" runat="server" Text='<%# Eval("Name") %>' AreaId='<%# Eval("Id") %>' CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
                </div>
                <div class="">
                    <asp:Label ID="lbl_Price" runat="server" Text="价格"></asp:Label>
                    <asp:LinkButton ID="lbl_Price_Unlimit" runat="server" Text="不限" OnClick="OnClick_Price" PriceId="0"> </asp:LinkButton>
                    <asp:LinkButton ID="lbtn_" runat="server" Text="500元以下" OnClick="OnClick_Price" PriceId="1"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton13" runat="server" Text="500-1000元" OnClick="OnClick_Price" PriceId="2"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton14" runat="server" Text="1000-1500元" OnClick="OnClick_Price" PriceId="3"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton15" runat="server" Text="1500-2000元" OnClick="OnClick_Price" PriceId="4"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton16" runat="server" Text="2000-3000元" OnClick="OnClick_Price" PriceId="5"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton17" runat="server" Text="3000-4500元" OnClick="OnClick_Price" PriceId="6"> </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton18" runat="server" Text="4500元以上" OnClick="OnClick_Price" PriceId="7"> </asp:LinkButton>
                </div>
                <div class="">
                    <asp:Label ID="lbl_LeaseModeId" runat="server" Text="出租方式"></asp:Label>
                    <asp:LinkButton ID="lbl_LeaseModeId_Unlimit" runat="server" Text="不限" OnClick="OnClick_LeaseModeId_Unlimit"> </asp:LinkButton>
                    <asp:DataList runat="server" ID="dl_LeaseMode" RepeatDirection="Horizontal" OnItemCommand="dl_LeaseMode_ItemCommand">

                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton19" runat="server" Text='<%# Eval("Name") %>' AreaId='<%# Eval("Id") %>' CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:DataList>
                </div>

                <div>
                    <asp:Label ID="lbl_RoomNumber" runat="server" Text="房间数"></asp:Label>
                    <asp:LinkButton ID="lbl_RoomNumberUnlimit" runat="server" Text="不限" RoomNumber="0" OnClick="OnClick_RoomNumber"> </asp:LinkButton>
                    <asp:LinkButton ID="lbl_RoomNumber1" runat="server" Text="1" Width="23" RoomNumber="1" OnClick="OnClick_RoomNumber"> </asp:LinkButton>
                    <asp:LinkButton ID="lbl_RoomNumber2" runat="server" Text="2" Width="23" RoomNumber="2" OnClick="OnClick_RoomNumber"> </asp:LinkButton>
                    <asp:LinkButton ID="lbl_RoomNumber3" runat="server" Text="3" Width="23" RoomNumber="3" OnClick="OnClick_RoomNumber"> </asp:LinkButton>
                    <asp:LinkButton ID="lbl_RoomNumber4" runat="server" Text="4" Width="23" RoomNumber="4" OnClick="OnClick_RoomNumber"> </asp:LinkButton>


                </div>

            </div>
            <!-- End of Search Area -->
            <div class="block-info" id="house-list">
                <asp:DataList ID="dl_HouseData" runat="server" CellPadding="4" ForeColor="#333333" Height="341px" RepeatDirection="Vertical" OnItemCommand="dl_HouseData_ItemCommand" Width="728px">
                    <AlternatingItemStyle BackColor="White" />
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <ItemTemplate>
                        <table class="auto-style1">
                            <tr>
                                <td class="" rowspan="4">
                                    <asp:Image ID="img_HouseURl" runat="server" CssClass="img-thumbnail img-md" DescriptionUrl='<%#"~/HouseDetail.aspx?Id="+ Eval("Id") %>' ImageUrl='<%# Eval("ThumbnailUri") %>' />
                                </td>
                                <td class="auto-style3">
                                    <asp:Label ID="lbl_HouseDescription" runat="server" Text="房源描述"></asp:Label>
                                </td>
                                <td class="auto-style3">价格：<asp:Label ID="lbl_Price" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="auto-style4">地址：<asp:Label ID="lbl_HouseAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                                </td>
                                <td class="auto-style4">规格:<asp:Label ID="lbl_Standard" runat="server" Text='<%# Eval("Standard") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lbl_PublishTime" runat="server" Text='<%# Eval("PublishTime") %>'></asp:Label>
                                    发布/<asp:Label ID="lbl_InTakeTime" runat="server" Text='<%# Eval("InTakeTime") %>'></asp:Label>
                                    可以入住</td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td>经纪人：<asp:Label ID="lbl_HouseHolderName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                                </td>
                                <td>
                                    <a href="IndexHouseDetail.aspx?HouseId= <%#Eval("Id") %>"> 查看 </a>
                                </td>
                            </tr>
                            <br />
                            <br />
                        </table>
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                </asp:DataList>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
                    ShowCustomInfoSection="Right" ShowPageIndexBox="always" PageIndexBoxType="DropDownList"
                    PageSize="2" OnPageChanged="AspNetPager1_PageChanged">
                </webdiyer:AspNetPager>
            </div>
        </div>

    </form>
</body>
</html>
